<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
  <meta name="description" content="">
  <meta name="author" content="ThemeBucket">
  <link rel="shortcut icon" href="#" type="../image/png">
  <title>欢迎模版页</title>
  <!--data table-->
  <link rel="stylesheet" href="../js/data-tables/DT_bootstrap.css" />
</head>
<body class="sticky-header" onload="indexmenu('${oneMenu}','${twoMenu}');">
<%@ include file="../index/index.jsp"%>
<section>
    <div class="main-content" >
    	<!-- 	地址栏 -->
		<div class="page-heading">
            <h3>
                	后台管理系统
            </h3>
            <ul class="breadcrumb">
                <li>
                    <a href="#">订单管理</a>
                </li>
                <li class="active">顾客订单</li>
            </ul>
        </div>    
        <!--内容开始的地方-->
<section class="panel">
						<header class="panel-heading custom-tab turquoise-tab">
                            <ul class="nav nav-tabs">
                                <li class="">
                                    <a href="#noPayOrders" data-toggle="tab"  onclick="clickOrders(1,4,0)">未付款</a>
                                </li>
                                <li class="">												<!-- clickOrders(1,1,0) -->
                                    <a href="" data-toggle="tab" onclick="clickOrders(1,3,0)">已付款(制作订单)</a>
                                </li>
                                <li class="">
                                    <a href="#systemSuccessJieOrders" data-toggle="tab"  onclick="clickOrders(1,8,0)">系统已处理</a>
                                </li>
                               <!--  
                                <li class="">
                                    <a href="#zhiZuoZhongOrders" data-toggle="tab"   onclick="clickOrders(1,3,0)">配货中</a>
                                </li>
                                <li class="">
                                    <a href="#zhiZuoWanOrders" data-toggle="tab"   onclick="clickOrders(1,4,0)">配货完成</a>
                                </li>
                                  <li class="">
                                    <a href="#tuiKuanWeiChuLiOrders" data-toggle="tab"  onclick="clickOrders(1,7,0)">退款未处理</a>
                                </li>
                                -->
                                <li class="">
                                    <a href="#yiFaHuoOrders" data-toggle="tab"   onclick="clickOrders(1,14,0)">已发货</a>
                                </li>
                                <li class="active">
                                    <a href="#yiShouHuoOrders" data-toggle="tab"  onclick="clickOrders(1,15,0)">已收货</a>
                                </li>
                                <li class="">
                                    <a href="#yiTuiKuanOrders" data-toggle="tab"  onclick="clickOrders(1,7,0)">已退款</a>
                                </li>        
                                                                                                                                                                                   
                            </ul>
                        </header>
                        <div class="panel-body">
                            <div class="tab-content">
                                <div id="noPayOrders" class="tab-pane active">
								<!-- 顾客订单 -->
					       			<table class="display table table-bordered table-striped dataTable table-hover" id="dynamic-table" aria-describedby="dynamic-table_info">								   	    		
					        			<thead>
								        	<tr role="row">
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" style="width: 50px;" aria-label="Rendering engine: activate to sort column ascending">订单号</th>						        	
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" style="width: 80px;" aria-label="Rendering engine: activate to sort column ascending">下单人</th>						        		
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" style="width: 80px;" aria-label="Rendering engine: activate to sort column ascending">收货人</th>
												<th tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" style="width: 80px;" aria-sort="descending" aria-label="Browser: activate to sort column ascending">下单时间</th>   					        		
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" style="width: 140px;" aria-label="Engine version: activate to sort column ascending">备注</th>
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" style="width: 80px;" aria-label="Platform(s): activate to sort column ascending">订单状态</th>	
								        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" style="width: 80px;" aria-label="Platform(s): activate to sort column ascending">订单价格</th>	       
								        	
								        		<th  style="width: 106px;">操作</th>
								        	</tr>
								        </thead>
								        <tbody>
								        	<c:forEach items="${orders}" var="order">
								        		<tr class="gradeA even" data-toggle="modal" data-target="#myModal" onclick="findGoodsByOrderId(${order.indentId})">
									        		<td>${order.indentId}</td>
									        		<td>${order.name}</td>
									        		<td>${order.takeGoodsTel}</td>
									        		<td>${order.beginTime}</td>
									        		<td>${order.remark}</td>
									        		<td>已收货</td>								        		
									        		<td>${order.indentGoodsPrice}</td>
									        		<td><button class="btn btn-info" type="button">待定</button></td>
									        	</tr>
								        	</c:forEach>								        
								        
								        </tbody>
									</table>
							<!-- 分页开始 -->
						  	<div class="row-fluid">
							  	<div class="span6">
								  	<div class="dataTables_paginate paging_bootstrap pagination">
									  	<ul>									  		
								  			<c:choose>
									  			<c:when test="${page.currentPage==1}">
									  				<li class="prev">
									  					<a class="page-link">← 上一页</a>
									  				</li>
									  			</c:when>
									  			<c:otherwise>
									  				<li class="prev">
									  					<a href="../orders/toNewOrders.do?currentPage=${page.currentPage-1}&status=6&afterSale=0" class="page-link">← 上一页</a>
									  				</li>
									  			</c:otherwise>	 							  			
								  			</c:choose>
						                  <c:forEach begin="1" end="${page.totalPage}" var="p">
						                    	<c:choose>
						                    		<c:when test="${page.currentPage==p}">
						                    			<c:if test="${p==1}">
						                    				<li  class="active page-item"><a class="page-link" href="../orders/toNewOrders.do?currentPage=${p}&status=6&afterSale=0" class="page-link">${p}</a></li> 
						                    				<c:if test="${page.totalPage>1}">
						                    					<li  class="page-item"><a class="page-link" href="../orders/toNewOrders.do?currentPage=${p+1}&status=6&afterSale=0">${p+1}</a></li>
						                    				</c:if>
						                    				<c:if test="${page.totalPage>2}">
						                    					<li  class="page-item"><a class="page-link" href="../orders/toNewOrders.do?currentPage=${p+2}&status=6&afterSale=0">${p+2}</a></li>
						                    				</c:if>
						                    				<c:if test="${page.totalPage>3}">
							                    				<li class="page-item"><a class="page-link" href="#">...</a></li>
							                    			</c:if>
						                    			</c:if>
						                    			<c:if test="${p>1}">                   			                   			
							                    			<c:if test="${p<page.totalPage}">
							                    				<c:if test="${p>2}">
							                    					<li class="page-item"><a class="page-link" href="#">...</a></li>
							                    				</c:if>
							                    				<li class="page-item"><a class="page-link" href="../orders/toNewOrders.do?currentPage=${p-1}&status=6&afterSale=0">${p-1}</a></li>
							                    				<li class="active page-item"><a class="page-link" href="../orders/toNewOrders.do?currentPage=${p}&status=6&afterSale=0" class="current_page">${p}</a></li>
							                    				<c:if test="${page.totalPage>2}">
							                    					<li class="page-item"><a class="page-link" href="../orders/toNewOrders.do?currentPage=${p+1}&status=6&afterSale=0">${p+1}</a></li>
							                    				</c:if>
							                    				<c:if test="${page.totalPage-p>1}">
							                    					<li class="page-item"><a class="page-link" href="#">...</a></li>
							                    				</c:if>
							                    			</c:if>
							                    			<c:if test="${p==page.totalPage}">
							                    				<c:if test="${p>3}">
							                    					<li class="page-item"><a class="page-link" href="#">...</a></li>
							                    				</c:if>
							                    				<c:if test="${p>2}">
							                    					<li class="page-item"><a class="page-link" href="../orders/toNewOrders.do?currentPage=${p-2}&status=6&afterSale=0">${p-2}</a></li>
							                    				</c:if>
							                    				<li class="page-item"><a class="page-link" href="../orders/toNewOrders.do?currentPage=${p-1}&status=6&afterSale=0">${p-1}</a></li>
							                    				<li class="active page-item"><a class="page-link" href="../orders/toNewOrders.do?currentPage=${p}&status=6&afterSale=0" class="current_page">${p}</a></li>
							                    			</c:if>
						                    			</c:if>
						                    		</c:when>
						                    	</c:choose>
						                    </c:forEach>					

								  			<c:choose>
									  			<c:when test="${page.currentPage==page.totalPage}">
									  					<li class="pre"><a class="page-link">下一页 → </a></li>
									  			</c:when>
									  			<c:otherwise>
									  					<li class="pre"><a href="../orders/toNewOrders.do?currentPage=${page.currentPage+1}&status=6&afterSale=0" class="page-link">← 下一页</a>
									  					</li>
									  			</c:otherwise>	 							  			
								  			</c:choose>
											<li class="page-item"> <a class="page-link">总共${page.totalPage}页</a></li>
									  	</ul>
								  	</div>
								</div>
							</div>
							<!-- 分页结束 -->
                                </div>
                              
                              
                              
                              
                              
             
                          </div>
                      </div>
</section>        
       <!-- 查看详情的模态框 1-->
		<div class="modal fade bs-example-modal-lg" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
		  <div class="modal-dialog modal-lg">											
		    <div class="modal-content">
		      <div class="modal-header">
		        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
		        <h4 class="modal-title" id="myModalLabel">订单详情</h4>
		      </div>
		      <div class="modal-body" id="orderDetailDiv">
		       <!--这是模态框内容  -->
	       			<table class="display table table-bordered table-striped dataTable table-hover" id="dynamic-table" aria-describedby="dynamic-table_info">								   	    		
	        			<thead>
				        	<tr role="row">
				        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" style="width: 50px;" aria-label="Rendering engine: activate to sort column ascending">商品编号</th>						        	
				        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" style="width: 80px;" aria-label="Rendering engine: activate to sort column ascending">商品图片</th>					        		
				        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" style="width: 80px;" aria-label="Rendering engine: activate to sort column ascending">商品单价</th>
								<th tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" style="width: 80px;" aria-sort="descending" aria-label="Browser: activate to sort column ascending">商品计价单位</th> 
								<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" style="width: 80px;" aria-label="Platform(s): activate to sort column ascending">类型</th>	  					        		
				        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" style="width: 140px;" aria-label="Engine version: activate to sort column ascending">配件个数</th>
				        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" style="width: 80px;" aria-label="Platform(s): activate to sort column ascending">配件选了多少</th>
				        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" style="width: 80px;" aria-label="Platform(s): activate to sort column ascending">配件配饰</th>				        		
				        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" style="width: 80px;" aria-label="Platform(s): activate to sort column ascending">加装</th>
				        		<th role="columnheader" tabindex="0" aria-controls="dynamic-table" rowspan="1" colspan="1" style="width: 80px;" aria-label="Platform(s): activate to sort column ascending">总价</th>	
				        		
				        	</tr>
				        </thead>
				        <tbody>
				        
				        
				        </tbody>
					</table>		       
		       
		       <!-- 这是模态框内容结束 -->
		      </div>
		      <div class="modal-footer">
		        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
		      </div>
		    </div>
		  </div>
		</div>       
		<!-- 模态框结束 -->        
		<!-- 模态框结束 -->           
		<!--内容结束了 -->
	</div>
</section>
</body>
<script src="../js/orders/customerOrders.js"></script>
</html>
